<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>事件绑定</title>
</head>
<body>
<div id="div">
    <div>{{name}}</div>
    <button @click="change()">改变div的内容</button>
    <button @dbclick="change()">改变div的内容</button>
</div>
</body>
<script src="js/vue.js"></script>
<script>
    new Vue({
        el: "#div",
        data: {
            name: "张三"
        },
        methods:{
            change(){
                this.name="李四"
            }
        }
    });
</script>
</html>